#pragma once
#include "afxstd.h"
#include "wxSceneCanvasBase.h"
class wxSceneCanvasGL :
    public wxSceneCanvasBase
{
public:
    wxSceneCanvasGL(wxWindow* parent=(wxWindow*)NULL,
        wxWindowID id=wxID_ANY,
        const wxPoint &pos=wxDefaultPosition,
        const wxSize &size=wxDefaultSize,
        const wxString &name=wxT("OSG"),
        long style=0,
        int *attributes=0
        );
    ~wxSceneCanvasGL(void);
protected:
    virtual void OnPaint(wxPaintEvent& e);
private:
    int getWidth();
    int getHeight();

    void render(wxPaintEvent& evt);
    void prepare3DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y);
    void prepare2DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y);
};

